package org.graduates.webapp.actions.course;

import java.util.ArrayList;
import java.util.List;

import org.graduates.webapp.actions.BaseAction;
import org.projects.graduates.domain.Course;

import com.opensymphony.xwork2.ActionSupport;

public class CoursesAction extends BaseAction {
	private static final long serialVersionUID = -1104659873514626163L;

	private List<Course> courses = new ArrayList<Course>();

	public String execute() {

		// 查找这个老师的所有课程

		// courses.addAll(Course.findAllBy());
		courses.addAll(Course.findAll(Course.class));
		return ActionSupport.SUCCESS;
	}

	public List<Course> getCourses() {
		return courses;
	}

	public void setCourses(List<Course> courses) {
		this.courses = courses;
	}

}
